package com.zxa.util;

import com.sun.xml.internal.bind.v2.util.QNameMap;
import com.zxa.pojo.Product;

import java.util.*;

/**
 * Created by zxa on 17-7-23.
 */
public class MapUtil
{
    public static List<Product> getOrderList(Map map) {
        List<Product> list = new ArrayList<Product>(map.values());
        Collections.sort(list, new Comparator<Product>() {
            //升序排序
            public int compare(Product o1,
                               Product o2) {
                return o1.getId()-o2.getId();
            }

        });
        return list;
    }


}
